/**
 * Created by xiangyufang on 2016/11/10.
 */
var ambientTemplate = {

    // 第三方管道设施
    thirdCross: [
        {name: 'pipeLineName', title: '管道名称：'},
        {name: 'type', title: '类型：'},
        {name: 'name', title: '名称：'},
        {name: 'owner', title: '所属单位：'},
        {name: 'cptype', title: '阴保方式：'},
        {name: 'contact', title: '联系人/单位：'},
        {name: 'telephone', title: '联系方式：'},
        {name: 'relativePositionRelation', title: '相对位置关系：'},

        {name: 'crossMileage', title: '绝对距离(m)：'},
        {name: 'crossNagm', title: '最近测试桩：'},
        {name: 'crossNagmMileage', title: '相对最近参考点距离(m)：'},
        {name: 'locationDescription', title: '位置描述：'},
        {name: 'manupipeType', title: '垂直间距：'},


        {name: 'safeHeight', title: '是否为安全间距：'},
        {name: 'recorder', title: '记录人：'},
        {name: 'recordTime', title: '记录时间：'},
        {name: 'remarks', title: '备注：'}
    ],
    thirdParallel: [
        {name: 'pipeLineName', title: '管道名称：'},
        {name: 'type', title: '类型：'},
        {name: 'name', title: '名称：'},
        {name: 'owner', title: '所属单位：'},
        {name: 'cptype', title: '阴保方式：'},
        {name: 'contact', title: '联系人/单位：'},
        {name: 'telephone', title: '联系方式：'},
        {name: 'relativePositionRelation', title: '相对位置关系：'},

        {name: 'beginMileage', title: '起点绝对距离(m)：'},
        {name: 'beginNagm', title: '起点最近测试桩：'},
        {name: 'beginNagmMileage', title: '起点相对最近参考点距离(m)：'},
        {name: 'beginDescription', title: '起点位置描述：'},
        {name: 'endMileage', title: '终点绝对距离(m)：'},
        {name: 'endNagm', title: '终点最近测试桩：'},
        {name: 'endNagmMileage', title: '终点相对最近参考点距离(m)：'},
        {name: 'endDescription', title: '终点位置描述：'},
        {name: 'minDistance', title: '最小平行间距：'},

        {name: 'safeHeight', title: '是否为安全间距：'},
        {name: 'recorder', title: '记录人：'},
        {name: 'recordTime', title: '记录时间：'},
        {name: 'remarks', title: '备注：'}
    ],

    // 交通设施
    trafficCross: [
        {name: 'pipeLineName', title: '管道名称：'},
        {name: 'type', title: '类型：'},
        {name: 'name', title: '名称：'},
        {name: 'owner', title: '所属单位：'},
        {name: 'contact', title: '联系人/单位：'},
        {name: 'telephone', title: '联系方式：'},
        {name: 'relativePositionRelation', title: '相关位置关系：'},

        {name: 'crossMileage', title: '绝对距离(m)：'},
        {name: 'crossNagm', title: '最近测试桩：'},
        {name: 'crossNagmMileage', title: '相对最近参考点距离(m)：'},
        {name: 'locationDescription', title: '位置描述：'},
        {name: 'altitudeSeparation', title: '垂直间距（m）：'},

        {name: 'safeHeight', title: '是否为安全间距：'},
        {name: 'recorder', title: '记录人：'},
        {name: 'recordTime', title: '记录时间：'},
        {name: 'remarks', title: '备注：'}
    ],

    trafficParallel: [
        {name: 'pipeLineName', title: '管道名称：'},
        {name: 'type', title: '类型：'},
        {name: 'name', title: '名称：'},
        {name: 'owner', title: '所属单位：'},
        {name: 'contact', title: '联系人/单位：'},
        {name: 'telephone', title: '联系方式：'},
        {name: 'relativePositionRelation', title: '相关位置关系：'},

        {name: 'beginMileage', title: '起点绝对距离(m)：'},
        {name: 'beginNagm', title: '起点最近测试桩：'},
        {name: 'beginNagmMileage', title: '起点相对最近参考点距离(m)：'},
        {name: 'endMileage', title: '终点绝对距离(m)：'},
        {name: 'endNagm', title: '终点最近测试桩：'},
        {name: 'endNagmMileage', title: '终点相对最近参考点距离(m)：'},
        {name: 'beginDescription', title: '起点位置描述：'},
        {name: 'endDescription', title: '终点位置描述：'},
        {name: 'minDistance', title: '最小间距(m)：'},
        {name: 'parallelLength', title: '平行长度（m）：'},

        {name: 'safeHeight', title: '是否为安全间距：'},
        {name: 'recorder', title: '记录人：'},
        {name: 'recordTime', title: '记录时间：'},
        {name: 'remarks', title: '备注：'}
    ],

    // 特定场所
    specific: [
        {name: 'pipeLineName', title: '管道名称：'},
        {name: 'name', title: '特定场所名称：'},
        {name: 'category', title: '特定场所类别：'},
        {name: 'type', title: '特定场所类型：'},
        {name: 'minDistance', title: '与管道最小间距：'},
        {name: 'locationDescription', title: '位置描述：'},
        {name: 'population', title: '人口数量：'},
        {name: 'recorder', title: '记录人：'},
        {name: 'recordTime', title: '记录时间：'},
        {name: 'remarks', title: '备注：'}
    ],

    // 地下排污排水设施
    drainageCross: [
        {name: 'pipeLineName', title: '管道名称：'},
        {name: 'name', title: '设施名称：'},
        {name: 'type', title: '设施类型：'},
        {name: 'owner', title: '所属单位：'},
        {name: 'telephone', title: '联系方式：'},
        {name: 'relativePositionRelation', title: '相对位置关系：'},
        {name: 'crossNagmInput', title: '桩号：'},
        {name: 'crossNagmMileageInput', title: '相对桩的距离(m)：'},
        {name: 'locationDescription', title: '位置描述：'},
        {name: 'confinedSpace', title: '是否密闭空间：'},
        {name: 'recorder', title: '记录人：'},
        {name: 'recordTime', title: '记录时间：'},
        {name: 'remarks', title: '备注：'}
    ],
    drainageParallel: [
        {name: 'pipeLineName', title: '管道名称：'},
        {name: 'name', title: '设施名称：'},
        {name: 'type', title: '设施类型：'},
        {name: 'owner', title: '所属单位：'},
        {name: 'telephone', title: '联系方式：'},
        {name: 'relativePositionRelation', title: '相对位置关系：'},
        {name: 'beginNagmInput', title: '起点桩号：'},
        {name: 'beginNagmMileageInput', title: '起点相对桩的距离(m)：'},
        {name: 'endNagmInput', title: '终点桩号：'},
        {name: 'endNagmMileageInput', title: '终点相对桩的距离（m）：'},
        {name: 'minDistance', title: '最小平行间距(m)：'},
        {name: 'confinedSpace', title: '是否密闭空间：'},
        {name: 'recorder', title: '记录人：'},
        {name: 'recordTime', title: '记录时间：'},
        {name: 'remarks', title: '备注：'}
    ],

    // 地质灾害
    geologic: [
        {name: 'pipeLineName', title: '管道名称：'},
        {name: 'type', title: '灾害类型：'},
        {name: 'riskProbabilityScore', title: '风险概率分值：'},
        {name: 'riskProbabilityLevel', title: '风险概率分级：'},
        {name: 'beginNagmInput', title: '起点桩号：'},
        {name: 'beginNagmMileageInput', title: '起点相对桩的距离(m)：'},
        {name: 'endNagmInput', title: '终点桩号：'},
        {name: 'endNagmMileageInput', title: '终点相对桩的距离(m)：'},
        {name: 'locationDescription', title: '位置描述：'},
        {name: 'consequenceLevel', title: '后果分级：'},
        {name: 'riskLevel', title: '风险等级：'},
        {name: 'recorder', title: '记录人：'},
        {name: 'recordTime', title: '记录时间：'},
        {name: 'remarks', title: '备注：'}
    ],

    //应急资源
    resource: [
        {name: 'name', title: '应急资源名称：'},
        {name: 'type', title: '应急资源类别：'},
        {
            name: 'province', title: '应急资源地址：',render:function(){
            return ''
        },isDiv:'false', node: [
            {name: 'province', title: '',render:function(d){
                if(d.indexOf('省')>0){
                    return d;
                }else {
                    return '';
                }
            }},
            {name: 'city', title: '',render:function(d){
                if(d == '市辖区' || d == '辖区'){
                    return '';
                }else {
                    return d;
                }
            }},
            {name: 'district', title: '',render:function(d){
                if(d == '其他'){
                    return '';
                }else {
                    return d;
                }
            }},
            {name: 'town', title: '',render:function(d){
                if(d == '-'){
                    return '';
                }else {
                    return d;
                }
            }},
            {name: 'village', title: '',render:function(d){
                if(d == '-'){
                    return '';
                }else {
                    return d;
                }
            }}
        ]
        },
        {name: 'contact', title: '联系人：'},
        {name: 'telephone', title: '联系电话：'},
        {name: 'recorder', title: '记录人：'},
        {name: 'recordTime', title: '记录时间：'},
        {name: 'remarks', title: '备注：'}
    ],

    // 难以维修接近
    hard: [
        {name: 'pipeLineName', title: '管道名称：'},
        {name: 'customNumber', title: '编号：'},
        {name: 'beginNagmInput', title: '起点桩号：'},
        {name: 'beginNagmMileageInput', title: '起点相对桩的距离(m)：'},
        {name: 'endNagmInput', title: '终点桩号：'},
        {name: 'endNagmMileageInput', title: '终点相对桩的距离(m)：'},
        {name: 'locationDescription', title: '位置描述：'},
        {name: 'reason', title: '难以接近原因：'},
        {name: 'recorder', title: '记录人：'},
        {name: 'recordTime', title: '记录时间：'},
        {name: 'remarks', title: '备注：'}
    ],

    // 管道占压
    occupy: [
        {name: 'pipeLineName', title: '管道名称：'},
        {name: 'name', title: '占压名称：'},
        {name: 'type', title: '占压类型：'},
        {name: 'contact', title: '联系人：'},
        {name: 'telephone', title: '联系电话：'},
        {name: 'nagmInput', title: '桩号：'},
        {name: 'nagmMileageInput', title: '相对桩的距离(m)：'},
        {name: 'locationDescription', title: '位置描述：'},
        {name: 'minDistance', title: '与管道最小间距(m)：'},
        {name: 'coverDepth', title: '管道埋深(m)：'},
        {name: 'foundDate', title: '发现日期：'},
        {name: 'foundWay', title: '发现方式：'},
        {name: 'recorder', title: '记录人：'},
        {name: 'recordTime', title: '记录时间：'},
        {name: 'remarks', title: '备注：'}
    ],

    // 人口分布
    man: [
        {name: 'pipeLineName', title: '管道名称：'},
        {name: 'beginPile', title: '起点桩号：'},
        {name: 'endPile', title: '终点桩号：'},
        {
            name: 'province', title: '地址信息：',render:function(){
            return ''
        },isDiv:'false', node: [
            {name: 'province', title: ''},
            {name: 'city', title: '',render:function(d){
                if(d == '市辖区' || d == '辖区'){
                    return '';
                }else {
                    return d;
                }
            }},
            {name: 'district', title: '',render:function(d){
                if(d == '其他'){
                    return '';
                }else {
                    return d;
                }
            }},
            {name: 'town', title: ''},
            {name: 'village', title: ''}
        ]
        },
        {name: 'population', title: '常驻人口数量：'},
        {name: 'contact', title: '联系人：'},
        {name: 'contactPosition', title: '联系人职务：'},
        {name: 'telephone', title: '联系电话：'},
        {name: 'recorder', title: '记录人：'},
        {name: 'recordTime', title: '记录时间：'},
        {name: 'remarks', title: '备注：'}
    ]
};